package wzh.crm.db;

import java.sql.*;

/**
 * Created by wangzehao on 2016/5/26.
 */
public class DB {
    static {
        try {
            init();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    private static Connection c;
    private static void init() throws Exception {
    }

    public static Connection getConnection(){
        return c;
    }

    public static ProductDB productDB() throws Exception {
        return new ProductDB();
    }

    public static ContactDB contactDB() throws Exception{
        return new ContactDB();
    }

    public static CustomerDB customerDB() throws Exception{
        return new CustomerDB();
    }

    public static OpportunityDB opportunityDB() throws Exception{
        return new OpportunityDB();
    }
}
